"""devopsPro URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from devops import views

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    # 登录
    url(r'^login/', views.login, name="login"),

    # 用户处理
    url(r'^userList/', views.userList, name="userList"),
    url(r'^userAdd/', views.userChange, name="userAdd"),
    url(r'^userEdit/(\d+)', views.userChange, name="userEdit"),
    url(r'^userDel/(\d+)', views.userDel, name="userDel"),

    # 主机管理
    url(r'^hostList/', views.hostList, name="hostList"),
    url(r'^hostEdit/(\d+)', views.hostChange, name="hostEdit"),
    url(r'^hostAdd/', views.hostChange, name="hostAdd"),
    url(r'^hostDel/(\d+)', views.hostDel, name="hostDel"),

    #初始化内容
    url(r'^initList/', views.initList, name="initList"),
    url(r'^initAdd/', views.initChange, name="initAdd"),
    url(r'^initEdit/(\d+)', views.initChange, name="initEdit"),
    url(r'^initDel/(\d+)', views.initDel, name="initDel"),

    #项目
    url(r'^projectList/', views.projectList, name="projectList"),
    url(r'^projectAdd/', views.projectChange, name="projectAdd"),
    url(r'^projectEdit/(\d+)', views.projectChange, name="projectEdit"),
    url(r'^projectDel/(\d+)', views.projectDel, name="projectDel"),
    url(r'^projectDetail/(\d+)', views.projectDetail, name="projectDetail"),

    #初始化信息日志
    url(r'^initLogAdd/', views.initLogAdd, name="initLogAdd"),
    url(r'^initLogList/(\d+)', views.initLogList, name="initLogList"),

]
